import {getCommonList} from "@/api/index"

export const queryCommonType = async (type)=>{
    const typeList = localStorage.getItem(type);
    if(typeList&&typeList.length>0) {
        return typeList;
    }
    const res = await getCommonList(type);
    if(res.code===200) {
        localStorage.getItem(type,res.data);
    }
    return res.data;
}